package com.leadership.training.entity.report;

import java.text.SimpleDateFormat;
import java.util.Date;

import com.leadership.training.entity.trainer.Trainer;

/**
 * 项目报表
 * 
 * @author Rockett
 *
 */
public class TrainerReport {
    /**
     * ID
     */
    private Long id;

    /**
     * 讲师姓名
     */
    private String name;

    /**
     * 讲师账户状态
     */
    private String trainerUserstatus;

    /**
     * 讲师所属供应商
     */
    private String trainerSupplier;
    /**
     * 讲师编号
     */
    private String code;
    /**
     * 讲师邮箱
     */
    private String email;
    /**
     * 是否认证
     */
    private boolean certified;
    /**
     * 讲师类型
     */
    private String trainerType;
    /**
     * 讲师级别
     */
    private String trainerLevel;

    /** 认证日期 */
    private Date certifiedDate;

    /** 授课时长 */
    private int trainingHour;
    /** 满意度 */
    private String satisfaction;

    private boolean disabled;

    /**
     * 标准课程集合
     */
    private String courses;

    public TrainerReport() {
        this.disabled = false;
    }

    public TrainerReport(Trainer trainer) {
        this.certified = trainer.isCertified();
        this.certifiedDate = trainer.getCertifiedDate();
        this.code = trainer.getCode();
        this.disabled = trainer.isDisabled();
        this.email = trainer.getEmail();
        this.id = trainer.getId();
        this.name = trainer.getName();
        this.trainerUserstatus = trainer.getTrainerUserstatus();
        this.trainerSupplier = trainer.getTrainerSupplier();
        this.satisfaction = trainer.getSatisfaction();
        this.trainerLevel = trainer.getTrainerLevel();
        this.trainerType = trainer.getTrainerType();
        this.trainingHour = trainer.getTrainingHour();

    }

    /**
     * @return the id
     */
    public Long getId() {
        return id;
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @return the trainerSupplier
     */
    public String getTrainerSupplier() {
        return trainerSupplier;
    }

    /**
     * @return the code
     */
    public String getCode() {
        return code;
    }

    /**
     * @return the email
     */
    public String getEmail() {
        return email;
    }

    /**
     * @return the certified
     */
    public boolean isCertified() {
        return certified;
    }

    /**
     * @return the trainerType
     */
    public String getTrainerType() {
        return trainerType;
    }

    /**
     * @return the trainerLevel
     */
    public String getTrainerLevel() {
        return trainerLevel;
    }

    /**
     * @return the certifiedDate
     */
    public Date getCertifiedDate() {
        return certifiedDate;
    }

    /**
     * @return the trainingHour
     */
    public int getTrainingHour() {
        return trainingHour;
    }

    /**
     * @return the satisfaction
     */
    public String getSatisfaction() {
        return satisfaction;
    }

    /**
     * @return the disabled
     */
    public boolean isDisabled() {
        return disabled;
    }

    /**
     * @return the courses
     */
    public String getCourses() {
        return courses;
    }

    /**
     * @param id
     *            the id to set
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @param name
     *            the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @param trainerSupplier
     *            the trainerSupplier to set
     */
    public void setTrainerSupplier(String trainerSupplier) {
        this.trainerSupplier = trainerSupplier;
    }

    /**
     * @param code
     *            the code to set
     */
    public void setCode(String code) {
        this.code = code;
    }

    /**
     * @param email
     *            the email to set
     */
    public void setEmail(String email) {
        this.email = email;
    }

    /**
     * @param certified
     *            the certified to set
     */
    public void setCertified(boolean certified) {
        this.certified = certified;
    }

    /**
     * @param trainerType
     *            the trainerType to set
     */
    public void setTrainerType(String trainerType) {
        this.trainerType = trainerType;
    }

    /**
     * @param trainerLevel
     *            the trainerLevel to set
     */
    public void setTrainerLevel(String trainerLevel) {
        this.trainerLevel = trainerLevel;
    }

    /**
     * @param certifiedDate
     *            the certifiedDate to set
     */
    public void setCertifiedDate(Date certifiedDate) {
        this.certifiedDate = certifiedDate;
    }

    /**
     * @param trainingHour
     *            the trainingHour to set
     */
    public void setTrainingHour(int trainingHour) {
        this.trainingHour = trainingHour;
    }

    /**
     * @param satisfaction
     *            the satisfaction to set
     */
    public void setSatisfaction(String satisfaction) {
        this.satisfaction = satisfaction;
    }

    /**
     * @param disabled
     *            the disabled to set
     */
    public void setDisabled(boolean disabled) {
        this.disabled = disabled;
    }

    /**
     * @param courses
     *            the courses to set
     */
    public void setCourses(String courses) {
        this.courses = courses;
    }

    /**
     * 是否认证 true-->是、false-->否
     * 
     * @return
     */
    public String getCertifiedStr() {
        if (this.certified) {
            return "是";
        } else {
            return "否";
        }
    }

    /**
     * @return the trainerUserstatus
     */
    public String getTrainerUserstatus() {
        return trainerUserstatus;
    }

    /**
     * @param trainerUserstatus
     *            the trainerUserstatus to set
     */
    public void setTrainerUserstatus(String trainerUserstatus) {
        this.trainerUserstatus = trainerUserstatus;
    }

    /**
     * 认证时间格式化
     * 
     * @return
     */
    public String getCertifiedDateStr() {
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
        return dateFormat.format(this.certifiedDate);
    }

}
